package com.xzit.homework;

import java.util.List;

public class LibraryManager {
    private List<BookCard> cards;
    public void setCards(List<BookCard> cards) {
        this.cards = cards;
    }
    public void provideBooks(){
        for(BookCard card : cards){
            String book;
            switch(card.getType()){
                case "红色A类":
                    book = "Java基础图书";
                    break;
                case "红色B类":
                    book = "HTML";
                    break;
                     case "蓝色A类":
                        book = "Oracle数据库";
                        break;
                default: book = "三国演义"; break;

            }
            System.out.println(card.getName() + " 借阅了《" + book + "》");
        }
    }
}
